import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '时间',
    dataIndex: 'createTime',
    width: 300,
  },
  {
    title: '用户名',
    dataIndex: 'userName',
    width: 280,
  },
  {
    title: 'IP地址',
    dataIndex: 'ip',
    width: 180,
  },
  {
    title: '原始消息',
    dataIndex: 'logMessage',
  },
  {
    title: '备注',
    dataIndex: 'memo',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'userName',
    label: '用户名',
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: 'createTime',
    label: '起止日期',
    component: 'RangePicker',
    colProps: { span: 8 },
    componentProps: {
      showTime: {
        format: 'HH:mm',
      },
      valueFormat: 'YYYY-MM-DD HH:mm',
      format: 'YYYY-MM-DD HH:mm',
    },
  },
  {
    field: 'ip',
    label: 'IP地址',
    component: 'Input',
    colProps: { span: 8 },
  },
];
